//
//  SockModel.swift
//  socksTest
//
//  Created by liujianlong on 2023/6/28.
//

import UIKit
enum Changetype{
    case normal
    case btn
    case slider
}
class SockModel: NSObject,NSCopying {
    func copy(with zone: NSZone? = nil) -> Any {
        let model = SockModel()
        model.name = self.name
        model.elect = self.elect
        model.current_t = self.current_t
        model.config_t = self.config_t
        model.ison = self.ison
        model.off_time = self.off_time
        model.change = self.change
        model.targetValue = self.targetValue
        return model
    }
    
    
    ///设备名称
    var name:String = ""
    ///设备电量
    var elect:Int = 0
    ///当前温度
    var current_t:Int = 0
    ///设置的温度
    var config_t:Int = 0
    ///开关机状态
    var ison:Bool = false
    ///定时关机时长
    var off_time:Int = 0
    ///通过什么方式设置温度
    var change:Changetype = .btn
    var motor:Bool = false
    ///将要修改的值
    var targetValue : Int = 10000

}
